package com.tarena.lbs.basic.web.repository;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tarena.lbs.basic.web.mapper.TagLibraryMapper;
import com.tarena.lbs.pojo.basic.po.TagLibraryPO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class TagLibraryRepository {
    @Autowired
    private TagLibraryMapper tagLibraryMapper;
    //04、查询用户可绑定的兴趣爱好的标签
    public List<TagLibraryPO> getTagsByType(Integer tagType) {
        QueryWrapper<TagLibraryPO> queryWrapper=new QueryWrapper<>();
        queryWrapper.eq("tag_type",tagType);
        return tagLibraryMapper.selectList(queryWrapper);
    }
}
